import service from "@/utils/request"
interface OrderSummaryType {
  inStockEndTime: string//入库结束日期	string	body	true
  inStockStartTime: string//入库开始日期	string	body	true
  mtlColor: string//颜色	string	body	true
  mtlName: string//材质	string	body	true
  mtlUnit: string//规格	string	body	true
  pageNum: number//	integer	body	true
  pageSize: number//	integer	body	true
  stock: number//0：全部 1：库存大于0	integer	body	true
  style: string//大类	string	body	true
}
interface TableListType {
  list: [],
  total: number,
  pageNum: number,
  pageSize: number,
}
interface SelectListType {
  brands: [],
  samples: [],
  seasons: [],
}
export default {
  // 获取表格列表
  getTableList(params: OrderSummaryType) {
    return service.post<any, any>('/stock/pcMtlStockList', params)
  },
  // 获取下拉列表
  getSelectList() {
    return service.get<any, SelectListType>('/pcOrder/getOrderCondition')
  },
  // 获取出入库单据明细
  getStockDetail(mtlNo: string) {
    return service.get<any, any>(`/stock/pcMtlStockInOutList?mtlNo=${mtlNo}`)
  },
  // 获取大类名称 大类代码下拉框
  getBigCategory() {
    return service.get<any, any>('/back/mtlTypeLMSQuery', {
      params: {
        mtlType: ''
      }
    })
  },
  // 型体、品牌、季节、样品、厂商、备料(purType)、用户(sysUser)
  getPcProdDynamicCondition() {
    return service.get<any, any>(`/prod/getPcProdDynamicCondition`)
  }
}